Koznitsa is a railway tunnel under the Koznitsa ridge in the Stara planina (Balkan Mountains), the longest tunnel in Bulgaria. The tunnel is located between the Bulgarian towns of Koprivshtitsa and Klisura and is 5,812 m long. It is the seventh tunnel on the Sofia–Karlovo line, starting at the exit of Koprivshtitsa station and ending just before Strema station. Along its entire length the tunnel is straight and at Koprivshtitsa the lights of the locomotive are visible a long distance into the tunnel.